import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('@/view/layout/index.vue'),
      children: [
        {
          path: '/',
          redirect: 'home',
        },
        {
          path: '/home',
          name: 'home',
          component: () => import('@/view/home/index.vue'),
        },
        {
          path: '/position',
          name: 'position',
          component: () => import('@/view/position/index.vue'),
        },
        {
          path: '/trends',
          name: 'trends',
          component: () => import('@/view/trends/index.vue'),
        },
        {
          path: '/life',
          name: 'life',
          component: () => import('@/view/life/index.vue'),
        },
      ],
    },
  ],
})

export default router
